# $Id: PKGBUILD 177017 2013-02-04 08:40:59Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=rarian
pkgver=0.8.1
pkgrel=3
pkgdesc="Documentation meta-data library, designed as a replacement for Scrollkeeper."
arch=('i686' 'x86_64' sh4)
url="http://rarian.freedesktop.org/"
license=('GPL')
depends=('gcc-libs')
makedepends=('libxslt')
options=('!libtool')
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.8/${pkgname}-${pkgver}.tar.bz2
        user-segfault.patch)
md5sums=('75091185e13da67a0ff4279de1757b94'
         '457e9827197009cfa360911fe49a5ad7')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np0 -i ../user-segfault.patch
  ./configure --prefix=/usr --sysconfdir=/etc \
     --localstatedir=/var --disable-static
  sed -i 's/^LDFLAGS =/LDFLAGS=-shared/' util/Makefile
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
